#ifndef _UTIL_H
#define _UTIL_H

#include "include.h"





typedef struct{
	u8_t seconds;  // 0-59
	u8_t minutes;  // 0-59
	u8_t hour;     // 0-23
	u8_t day;      // 0-30
	u8_t month;    // 0-11
	u16_t year;    // 1970+
} UTCTimeStruct;

PUBLIC void delayus(u16_t value);

PUBLIC void delayms(u16_t value);

PUBLIC void c51pause(void);

PUBLIC void xmemcpy(u8_t __xdata * dst, u8_t __xdata *src, u16_t len);

PUBLIC void xmemset(u8_t __xdata * dst, u8_t value, u16_t len);


PUBLIC bool UTIL_IsTimeoutPeriod330usTickCnt(u32_t prevValue, u32_t timeoutValue);

PUBLIC void UTIL_ConvertUTCTime( UTCTimeStruct *tm, u32_t secTime );


#endif
